package com.tree.springboot.controller;

import com.tree.dubbo.api.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName com.tree.springboot.controller
 * Description: <类功能描述>. <br>
 * <p>
 * <使用说明>
 * </p>
 * @Author tree
 * @Date 2019-08-26 00:10
 * @Version 1.0
 */
@Slf4j
@RestController
public class DefaultDemoController {

    @Reference(version = "${demo.service.version}")
    private DemoService demoService;

    @GetMapping("/hi")
    public String sayHello(String name){
        String result = demoService.sayHello(name);
        log.info("result ==> , {}", result);
        return result;
    }
}
